import request from '@/utils/request'

// 查询系统资源库列表
export function listAppSysResource(query) {
  return request({
    url: '/app/information/appSysResource/list',
    method: 'get',
    params: query
  })
}

// 查询系统资源库详细
export function getAppSysResource(id) {
  return request({
    url: '/app/information/appSysResource/' + id,
    method: 'get'
  })
}

// 新增系统资源库
export function addAppSysResource(data) {
  return request({
    url: '/app/information/appSysResource',
    method: 'post',
    data: data
  })
}

// 修改系统资源库
export function updateAppSysResource(data) {
  return request({
    url: '/app/information/appSysResource',
    method: 'put',
    data: data
  })
}

// 删除系统资源库
export function delAppSysResource(id) {
  return request({
    url: '/app/information/appSysResource/' + id,
    method: 'delete'
  })
}

export function checkAppSysResource(id, checkStatus) {
  return request({
    url: '/app/information/appSysResource/check?id=' + id+'&checkStatus='+checkStatus,
    method: 'get'
  })
}

export function getResourceBase64(id, url) {
  return request({
    url: '/app/information/appSysResource/getResourceBase64?remoteUrl=' + url+'&id='+id,
    method: 'get'
  })
}
